package com.ftg.learn.controller;

import com.ftg.learn.service.SysDeptService;
import com.ftg.learn.util.ToWeb;
import com.ftg.learn.vo.OrgTreeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author kangjx
 * @date 2024/2/20
 */
@RestController
@Api(tags = "部门管理")
public class SysDeptController {

    @Resource
    SysDeptService sysDeptService;

    @ApiOperation("树")
    @GetMapping("/orgtree")
    public ToWeb<List<OrgTreeVo>> orgTree() {
        return sysDeptService.orgTree();
    }

}
